.class public Lcom/xingbook/ting/lyric/h;
.super Landroid/widget/TextView;


# instance fields
.field public a:I

.field public b:I

.field public c:Landroid/graphics/Typeface;

.field public d:Landroid/graphics/Typeface;

.field public e:I

.field public f:F

.field public g:F

.field public h:I

.field public i:I

.field public j:I

.field final synthetic k:Lcom/xingbook/ting/lyric/LyricView;

.field private l:Landroid/graphics/Paint;

.field private m:Landroid/graphics/Paint;

.field private n:F


# direct methods
.method public constructor <init>(Lcom/xingbook/ting/lyric/LyricView;Landroid/content/Context;)V
    .locals 3

    const/4 v1, -0x1

    const/high16 v2, 0x422c

    iput-object p1, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    invoke-direct {p0, p2}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    iput v1, p0, Lcom/xingbook/ting/lyric/h;->a:I

    const v0, -0xff0100

    iput v0, p0, Lcom/xingbook/ting/lyric/h;->b:I

    sget-object v0, Landroid/graphics/Typeface;->SERIF:Landroid/graphics/Typeface;

    iput-object v0, p0, Lcom/xingbook/ting/lyric/h;->c:Landroid/graphics/Typeface;

    sget-object v0, Landroid/graphics/Typeface;->SERIF:Landroid/graphics/Typeface;

    iput-object v0, p0, Lcom/xingbook/ting/lyric/h;->d:Landroid/graphics/Typeface;

    const/4 v0, 0x0

    iput v0, p0, Lcom/xingbook/ting/lyric/h;->e:I

    iput v1, p0, Lcom/xingbook/ting/lyric/h;->i:I

    const/4 v0, 0x0

    instance-of v1, p2, Landroid/app/Activity;

    if-eqz v1, :cond_0

    check-cast p2, Landroid/app/Activity;

    :goto_0
    invoke-static {p2}, Lcom/xingbook/c/n;->f(Landroid/app/Activity;)F

    move-result v0

    mul-float v1, v2, v0

    iput v1, p0, Lcom/xingbook/ting/lyric/h;->f:F

    mul-float v1, v2, v0

    iput v1, p0, Lcom/xingbook/ting/lyric/h;->g:F

    const/high16 v1, 0x42aa

    mul-float/2addr v0, v1

    float-to-int v0, v0

    iput v0, p0, Lcom/xingbook/ting/lyric/h;->h:I

    const/high16 v0, 0x4190

    invoke-static {p2}, Lcom/xingbook/c/n;->b(Landroid/app/Activity;)F

    move-result v1

    mul-float/2addr v0, v1

    float-to-int v0, v0

    iput v0, p0, Lcom/xingbook/ting/lyric/h;->j:I

    invoke-direct {p0}, Lcom/xingbook/ting/lyric/h;->a()V

    return-void

    :cond_0
    move-object p2, v0

    goto :goto_0
.end method

.method private a()V
    .locals 3

    const/4 v2, 0x1

    invoke-virtual {p0, v2}, Lcom/xingbook/ting/lyric/h;->setFocusable(Z)V

    new-instance v0, Landroid/graphics/Paint;

    invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V

    iput-object v0, p0, Lcom/xingbook/ting/lyric/h;->l:Landroid/graphics/Paint;

    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->l:Landroid/graphics/Paint;

    invoke-virtual {v0, v2}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->l:Landroid/graphics/Paint;

    sget-object v1, Landroid/graphics/Paint$Align;->CENTER:Landroid/graphics/Paint$Align;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTextAlign(Landroid/graphics/Paint$Align;)V

    new-instance v0, Landroid/graphics/Paint;

    invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V

    iput-object v0, p0, Lcom/xingbook/ting/lyric/h;->m:Landroid/graphics/Paint;

    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->m:Landroid/graphics/Paint;

    invoke-virtual {v0, v2}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->m:Landroid/graphics/Paint;

    sget-object v1, Landroid/graphics/Paint$Align;->CENTER:Landroid/graphics/Paint$Align;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTextAlign(Landroid/graphics/Paint$Align;)V

    return-void
.end method


# virtual methods
.method public a(J)V
    .locals 2

    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    invoke-static {v0}, Lcom/xingbook/ting/lyric/LyricView;->b(Lcom/xingbook/ting/lyric/LyricView;)Lcom/xingbook/ting/lyric/d;

    move-result-object v0

    if-nez v0, :cond_1

    :cond_0
    :goto_0
    return-void

    :cond_1
    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    invoke-static {v0}, Lcom/xingbook/ting/lyric/LyricView;->b(Lcom/xingbook/ting/lyric/LyricView;)Lcom/xingbook/ting/lyric/d;

    move-result-object v0

    invoke-virtual {v0, p1, p2}, Lcom/xingbook/ting/lyric/d;->a(J)I

    move-result v0

    iget v1, p0, Lcom/xingbook/ting/lyric/h;->i:I

    if-eq v1, v0, :cond_0

    iput v0, p0, Lcom/xingbook/ting/lyric/h;->i:I

    invoke-virtual {p0}, Lcom/xingbook/ting/lyric/h;->invalidate()V

    goto :goto_0
.end method

.method protected onDraw(Landroid/graphics/Canvas;)V
    .locals 14

    const/4 v13, 0x1

    const/4 v8, 0x0

    const/high16 v12, 0x4000

    const/4 v2, 0x0

    invoke-super {p0, p1}, Landroid/widget/TextView;->onDraw(Landroid/graphics/Canvas;)V

    iget v0, p0, Lcom/xingbook/ting/lyric/h;->e:I

    invoke-virtual {p1, v0}, Landroid/graphics/Canvas;->drawColor(I)V

    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    invoke-static {v0}, Lcom/xingbook/ting/lyric/LyricView;->a(Lcom/xingbook/ting/lyric/LyricView;)Ljava/util/List;

    move-result-object v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    invoke-static {v0}, Lcom/xingbook/ting/lyric/LyricView;->b(Lcom/xingbook/ting/lyric/LyricView;)Lcom/xingbook/ting/lyric/d;

    move-result-object v0

    if-nez v0, :cond_1

    :cond_0
    :goto_0
    return-void

    :cond_1
    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->l:Landroid/graphics/Paint;

    iget v1, p0, Lcom/xingbook/ting/lyric/h;->a:I

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->m:Landroid/graphics/Paint;

    iget v1, p0, Lcom/xingbook/ting/lyric/h;->b:I

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->l:Landroid/graphics/Paint;

    iget v1, p0, Lcom/xingbook/ting/lyric/h;->f:F

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTextSize(F)V

    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->l:Landroid/graphics/Paint;

    iget-object v1, p0, Lcom/xingbook/ting/lyric/h;->c:Landroid/graphics/Typeface;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTypeface(Landroid/graphics/Typeface;)Landroid/graphics/Typeface;

    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->m:Landroid/graphics/Paint;

    iget v1, p0, Lcom/xingbook/ting/lyric/h;->g:F

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTextSize(F)V

    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->m:Landroid/graphics/Paint;

    iget-object v1, p0, Lcom/xingbook/ting/lyric/h;->d:Landroid/graphics/Typeface;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTypeface(Landroid/graphics/Typeface;)Landroid/graphics/Typeface;

    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    invoke-static {v0}, Lcom/xingbook/ting/lyric/LyricView;->b(Lcom/xingbook/ting/lyric/LyricView;)Lcom/xingbook/ting/lyric/d;

    move-result-object v0

    iget-boolean v0, v0, Lcom/xingbook/ting/lyric/d;->b:Z

    if-eqz v0, :cond_b

    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    invoke-virtual {v0}, Lcom/xingbook/ting/lyric/LyricView;->getHeight()I

    move-result v0

    div-int/lit8 v0, v0, 0x2

    int-to-float v0, v0

    iget v1, p0, Lcom/xingbook/ting/lyric/h;->g:F

    add-float/2addr v0, v1

    float-to-int v0, v0

    move v1, v2

    move v3, v0

    :goto_1
    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    invoke-static {v0}, Lcom/xingbook/ting/lyric/LyricView;->a(Lcom/xingbook/ting/lyric/LyricView;)Ljava/util/List;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-lt v1, v0, :cond_2

    iget v0, p0, Lcom/xingbook/ting/lyric/h;->j:I

    add-int/2addr v0, v3

    invoke-virtual {p0}, Lcom/xingbook/ting/lyric/h;->getHeight()I

    move-result v1

    if-eq v0, v1, :cond_0

    iget v0, p0, Lcom/xingbook/ting/lyric/h;->j:I

    add-int/2addr v0, v3

    invoke-virtual {p0, v0}, Lcom/xingbook/ting/lyric/h;->setHeight(I)V

    goto :goto_0

    :cond_2
    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    invoke-static {v0}, Lcom/xingbook/ting/lyric/LyricView;->a(Lcom/xingbook/ting/lyric/LyricView;)Ljava/util/List;

    move-result-object v0

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/xingbook/ting/lyric/j;

    invoke-virtual {v0}, Lcom/xingbook/ting/lyric/j;->b()Ljava/lang/String;

    move-result-object v0

    if-nez v0, :cond_3

    const-string v0, ""

    :cond_3
    iget v4, p0, Lcom/xingbook/ting/lyric/h;->i:I

    if-ne v1, v4, :cond_5

    iget-object v4, p0, Lcom/xingbook/ting/lyric/h;->m:Landroid/graphics/Paint;

    :goto_2
    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v9

    if-lez v9, :cond_9

    invoke-virtual {v4, v0}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F

    move-result v5

    iget v6, p0, Lcom/xingbook/ting/lyric/h;->n:F

    cmpl-float v5, v5, v6

    if-lez v5, :cond_8

    new-array v10, v9, [F

    invoke-virtual {v4, v0, v10}, Landroid/graphics/Paint;->getTextWidths(Ljava/lang/String;[F)I

    move v5, v2

    move v6, v8

    move v7, v3

    move v3, v2

    :goto_3
    if-lt v5, v9, :cond_6

    if-ge v3, v9, :cond_20

    invoke-virtual {v0, v3, v9}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v0

    iget v3, p0, Lcom/xingbook/ting/lyric/h;->n:F

    div-float/2addr v3, v12

    int-to-float v5, v7

    invoke-virtual {p1, v0, v3, v5, v4}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    iget v0, p0, Lcom/xingbook/ting/lyric/h;->h:I

    add-int v3, v7, v0

    :goto_4
    iget v0, p0, Lcom/xingbook/ting/lyric/h;->i:I

    if-ne v1, v0, :cond_4

    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    invoke-static {v0}, Lcom/xingbook/ting/lyric/LyricView;->c(Lcom/xingbook/ting/lyric/LyricView;)Z

    move-result v0

    if-nez v0, :cond_4

    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    iget-object v4, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    invoke-virtual {v4}, Lcom/xingbook/ting/lyric/LyricView;->getHeight()I

    move-result v4

    div-int/lit8 v4, v4, 0x2

    sub-int v4, v3, v4

    iget v5, p0, Lcom/xingbook/ting/lyric/h;->h:I

    mul-int/2addr v5, v13

    div-int/lit8 v5, v5, 0x2

    mul-int/lit8 v5, v5, 0x3

    sub-int/2addr v4, v5

    invoke-virtual {v0, v2, v4}, Lcom/xingbook/ting/lyric/LyricView;->scrollTo(II)V

    :cond_4
    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto/16 :goto_1

    :cond_5
    iget-object v4, p0, Lcom/xingbook/ting/lyric/h;->l:Landroid/graphics/Paint;

    goto :goto_2

    :cond_6
    aget v11, v10, v5

    add-float/2addr v6, v11

    iget v11, p0, Lcom/xingbook/ting/lyric/h;->n:F

    cmpl-float v11, v6, v11

    if-lez v11, :cond_7

    invoke-virtual {v0, v3, v5}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v3

    iget v6, p0, Lcom/xingbook/ting/lyric/h;->n:F

    div-float/2addr v6, v12

    int-to-float v11, v7

    invoke-virtual {p1, v3, v6, v11, v4}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    iget v3, p0, Lcom/xingbook/ting/lyric/h;->h:I

    add-int v6, v7, v3

    aget v3, v10, v5

    move v7, v6

    move v6, v3

    move v3, v5

    :cond_7
    add-int/lit8 v5, v5, 0x1

    goto :goto_3

    :cond_8
    iget v5, p0, Lcom/xingbook/ting/lyric/h;->n:F

    div-float/2addr v5, v12

    int-to-float v6, v3

    invoke-virtual {p1, v0, v5, v6, v4}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    iget v0, p0, Lcom/xingbook/ting/lyric/h;->h:I

    add-int/2addr v3, v0

    goto :goto_4

    :cond_9
    iget v0, p0, Lcom/xingbook/ting/lyric/h;->i:I

    if-ne v1, v0, :cond_a

    iget v0, p0, Lcom/xingbook/ting/lyric/h;->g:F

    :goto_5
    float-to-int v0, v0

    add-int/2addr v3, v0

    goto :goto_4

    :cond_a
    iget v0, p0, Lcom/xingbook/ting/lyric/h;->f:F

    goto :goto_5

    :cond_b
    iget v0, p0, Lcom/xingbook/ting/lyric/h;->j:I

    int-to-float v0, v0

    iget v1, p0, Lcom/xingbook/ting/lyric/h;->g:F

    add-float/2addr v0, v1

    float-to-int v0, v0

    move v1, v2

    move v3, v0

    :goto_6
    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    invoke-static {v0}, Lcom/xingbook/ting/lyric/LyricView;->a(Lcom/xingbook/ting/lyric/LyricView;)Ljava/util/List;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-lt v1, v0, :cond_e

    iget v0, p0, Lcom/xingbook/ting/lyric/h;->j:I

    add-int/2addr v0, v3

    iget-object v1, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    invoke-virtual {v1}, Lcom/xingbook/ting/lyric/LyricView;->getHeight()I

    move-result v1

    if-ge v0, v1, :cond_17

    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    invoke-virtual {v0}, Lcom/xingbook/ting/lyric/LyricView;->getHeight()I

    move-result v0

    invoke-virtual {p0, v0}, Lcom/xingbook/ting/lyric/h;->setHeight(I)V

    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    invoke-virtual {v0}, Lcom/xingbook/ting/lyric/LyricView;->getHeight()I

    move-result v0

    iget v1, p0, Lcom/xingbook/ting/lyric/h;->j:I

    add-int/2addr v1, v3

    sub-int/2addr v0, v1

    div-int/lit8 v0, v0, 0x2

    iget v1, p0, Lcom/xingbook/ting/lyric/h;->j:I

    add-int/2addr v0, v1

    int-to-float v0, v0

    iget v1, p0, Lcom/xingbook/ting/lyric/h;->g:F

    add-float/2addr v0, v1

    float-to-int v0, v0

    :goto_7
    move v1, v2

    move v3, v0

    :goto_8
    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    invoke-static {v0}, Lcom/xingbook/ting/lyric/LyricView;->a(Lcom/xingbook/ting/lyric/LyricView;)Ljava/util/List;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-ge v1, v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    invoke-static {v0}, Lcom/xingbook/ting/lyric/LyricView;->a(Lcom/xingbook/ting/lyric/LyricView;)Ljava/util/List;

    move-result-object v0

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/xingbook/ting/lyric/j;

    invoke-virtual {v0}, Lcom/xingbook/ting/lyric/j;->b()Ljava/lang/String;

    move-result-object v0

    if-nez v0, :cond_c

    const-string v0, ""

    :cond_c
    iget v4, p0, Lcom/xingbook/ting/lyric/h;->i:I

    if-ne v1, v4, :cond_18

    iget-object v4, p0, Lcom/xingbook/ting/lyric/h;->m:Landroid/graphics/Paint;

    :goto_9
    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v9

    if-lez v9, :cond_1c

    invoke-virtual {v4, v0}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F

    move-result v5

    iget v6, p0, Lcom/xingbook/ting/lyric/h;->n:F

    cmpl-float v5, v5, v6

    if-lez v5, :cond_1b

    new-array v10, v9, [F

    invoke-virtual {v4, v0, v10}, Landroid/graphics/Paint;->getTextWidths(Ljava/lang/String;[F)I

    move v5, v2

    move v6, v8

    move v7, v3

    move v3, v2

    :goto_a
    if-lt v5, v9, :cond_19

    if-ge v3, v9, :cond_1e

    invoke-virtual {v0, v3, v9}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v0

    iget v3, p0, Lcom/xingbook/ting/lyric/h;->n:F

    div-float/2addr v3, v12

    int-to-float v5, v7

    invoke-virtual {p1, v0, v3, v5, v4}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    iget v0, p0, Lcom/xingbook/ting/lyric/h;->h:I

    add-int v3, v7, v0

    :goto_b
    iget v0, p0, Lcom/xingbook/ting/lyric/h;->i:I

    if-ne v1, v0, :cond_d

    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    invoke-static {v0}, Lcom/xingbook/ting/lyric/LyricView;->c(Lcom/xingbook/ting/lyric/LyricView;)Z

    move-result v0

    if-nez v0, :cond_d

    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    iget-object v4, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    invoke-virtual {v4}, Lcom/xingbook/ting/lyric/LyricView;->getHeight()I

    move-result v4

    div-int/lit8 v4, v4, 0x2

    sub-int v4, v3, v4

    iget v5, p0, Lcom/xingbook/ting/lyric/h;->h:I

    mul-int/2addr v5, v13

    div-int/lit8 v5, v5, 0x2

    mul-int/lit8 v5, v5, 0x3

    sub-int/2addr v4, v5

    invoke-virtual {v0, v2, v4}, Lcom/xingbook/ting/lyric/LyricView;->scrollTo(II)V

    :cond_d
    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_8

    :cond_e
    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    invoke-static {v0}, Lcom/xingbook/ting/lyric/LyricView;->a(Lcom/xingbook/ting/lyric/LyricView;)Ljava/util/List;

    move-result-object v0

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/xingbook/ting/lyric/j;

    invoke-virtual {v0}, Lcom/xingbook/ting/lyric/j;->b()Ljava/lang/String;

    move-result-object v0

    if-nez v0, :cond_f

    const-string v0, ""

    :cond_f
    iget v4, p0, Lcom/xingbook/ting/lyric/h;->i:I

    if-ne v1, v4, :cond_11

    iget-object v4, p0, Lcom/xingbook/ting/lyric/h;->m:Landroid/graphics/Paint;

    :goto_c
    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v6

    if-lez v6, :cond_15

    invoke-virtual {v4, v0}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F

    move-result v5

    iget v7, p0, Lcom/xingbook/ting/lyric/h;->n:F

    cmpl-float v5, v5, v7

    if-lez v5, :cond_14

    new-array v7, v6, [F

    invoke-virtual {v4, v0, v7}, Landroid/graphics/Paint;->getTextWidths(Ljava/lang/String;[F)I

    move v0, v2

    move v4, v8

    move v5, v3

    move v3, v2

    :goto_d
    if-lt v3, v6, :cond_12

    if-ge v0, v6, :cond_1f

    iget v0, p0, Lcom/xingbook/ting/lyric/h;->h:I

    add-int v3, v5, v0

    :goto_e
    iget v0, p0, Lcom/xingbook/ting/lyric/h;->i:I

    if-ne v1, v0, :cond_10

    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    invoke-static {v0}, Lcom/xingbook/ting/lyric/LyricView;->c(Lcom/xingbook/ting/lyric/LyricView;)Z

    move-result v0

    if-nez v0, :cond_10

    iget-object v0, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    iget-object v4, p0, Lcom/xingbook/ting/lyric/h;->k:Lcom/xingbook/ting/lyric/LyricView;

    invoke-virtual {v4}, Lcom/xingbook/ting/lyric/LyricView;->getHeight()I

    move-result v4

    div-int/lit8 v4, v4, 0x2

    sub-int v4, v3, v4

    iget v5, p0, Lcom/xingbook/ting/lyric/h;->h:I

    mul-int/2addr v5, v13

    div-int/lit8 v5, v5, 0x2

    mul-int/lit8 v5, v5, 0x3

    sub-int/2addr v4, v5

    invoke-virtual {v0, v2, v4}, Lcom/xingbook/ting/lyric/LyricView;->scrollTo(II)V

    :cond_10
    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto/16 :goto_6

    :cond_11
    iget-object v4, p0, Lcom/xingbook/ting/lyric/h;->l:Landroid/graphics/Paint;

    goto :goto_c

    :cond_12
    aget v9, v7, v3

    add-float/2addr v4, v9

    iget v9, p0, Lcom/xingbook/ting/lyric/h;->n:F

    cmpl-float v9, v4, v9

    if-lez v9, :cond_13

    iget v0, p0, Lcom/xingbook/ting/lyric/h;->h:I

    add-int v4, v5, v0

    aget v0, v7, v3

    move v5, v4

    move v4, v0

    move v0, v3

    :cond_13
    add-int/lit8 v3, v3, 0x1

    goto :goto_d

    :cond_14
    iget v0, p0, Lcom/xingbook/ting/lyric/h;->h:I

    add-int/2addr v3, v0

    goto :goto_e

    :cond_15
    iget v0, p0, Lcom/xingbook/ting/lyric/h;->i:I

    if-ne v1, v0, :cond_16

    iget v0, p0, Lcom/xingbook/ting/lyric/h;->g:F

    :goto_f
    float-to-int v0, v0

    add-int/2addr v3, v0

    goto :goto_e

    :cond_16
    iget v0, p0, Lcom/xingbook/ting/lyric/h;->f:F

    goto :goto_f

    :cond_17
    iget v0, p0, Lcom/xingbook/ting/lyric/h;->j:I

    add-int/2addr v0, v3

    invoke-virtual {p0, v0}, Lcom/xingbook/ting/lyric/h;->setHeight(I)V

    iget v0, p0, Lcom/xingbook/ting/lyric/h;->j:I

    int-to-float v0, v0

    iget v1, p0, Lcom/xingbook/ting/lyric/h;->g:F

    add-float/2addr v0, v1

    float-to-int v0, v0

    goto/16 :goto_7

    :cond_18
    iget-object v4, p0, Lcom/xingbook/ting/lyric/h;->l:Landroid/graphics/Paint;

    goto/16 :goto_9

    :cond_19
    aget v11, v10, v5

    add-float/2addr v6, v11

    iget v11, p0, Lcom/xingbook/ting/lyric/h;->n:F

    cmpl-float v11, v6, v11

    if-lez v11, :cond_1a

    invoke-virtual {v0, v3, v5}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v3

    iget v6, p0, Lcom/xingbook/ting/lyric/h;->n:F

    div-float/2addr v6, v12

    int-to-float v11, v7

    invoke-virtual {p1, v3, v6, v11, v4}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    iget v3, p0, Lcom/xingbook/ting/lyric/h;->h:I

    add-int v6, v7, v3

    aget v3, v10, v5

    move v7, v6

    move v6, v3

    move v3, v5

    :cond_1a
    add-int/lit8 v5, v5, 0x1

    goto/16 :goto_a

    :cond_1b
    iget v5, p0, Lcom/xingbook/ting/lyric/h;->n:F

    div-float/2addr v5, v12

    int-to-float v6, v3

    invoke-virtual {p1, v0, v5, v6, v4}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    iget v0, p0, Lcom/xingbook/ting/lyric/h;->h:I

    add-int/2addr v3, v0

    goto/16 :goto_b

    :cond_1c
    iget v0, p0, Lcom/xingbook/ting/lyric/h;->i:I

    if-ne v1, v0, :cond_1d

    iget v0, p0, Lcom/xingbook/ting/lyric/h;->g:F

    :goto_10
    float-to-int v0, v0

    add-int/2addr v3, v0

    goto/16 :goto_b

    :cond_1d
    iget v0, p0, Lcom/xingbook/ting/lyric/h;->f:F

    goto :goto_10

    :cond_1e
    move v3, v7

    goto/16 :goto_b

    :cond_1f
    move v3, v5

    goto/16 :goto_e

    :cond_20
    move v3, v7

    goto/16 :goto_4
.end method

.method protected onSizeChanged(IIII)V
    .locals 1

    invoke-super {p0, p1, p2, p3, p4}, Landroid/widget/TextView;->onSizeChanged(IIII)V

    int-to-float v0, p1

    iput v0, p0, Lcom/xingbook/ting/lyric/h;->n:F

    return-void
.end method
